package flc.ast.adapter;

import android.graphics.drawable.Drawable;
import android.widget.ImageView;

import androidx.annotation.NonNull;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.target.Target;
import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import flc.ast.R;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;

public class MyDrawAdapter extends StkProviderMultiAdapter<String> {
    public MyDrawAdapter() {
        super(8);
        addItemProvider(new MyDrawItemProvider());
    }

    private class MyDrawItemProvider extends BaseItemProvider<String> {
        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_album;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, String bean) {
            Glide.with(baseViewHolder.itemView).load(bean).into((ImageView) baseViewHolder.getView(R.id.ivAlbumItemImg));
        }
    }
}
